package solution3;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Solution solution = new Solution();
        while (sc.hasNext()) {
            // 包括空格用nextLine()，不包括空格用next()
            String s = sc.nextLine();
            System.out.println(solution.lengthOfLongestSubstring3(s));
        }
    }
}
